import {ref, computed, reactive, onMounted} from 'vue'
import {defineStore} from 'pinia'
import {getCategory} from '@/apis/brand.js'

// 获取品牌的分类信息
export const getCategoryStore = defineStore('category', () => {
    const categoryList = ref({})
    const category = async () => {
        const res = await getCategory()
        categoryList.value = res.data
    }

    onMounted(() => category()
    )

    return {categoryList, category}
})




